package com.ruoyi.system.domain.dao;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eic.framework.core.annotation.UpdateTime;
import com.eic.framework.core.annotation.UpdateUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;

/**
 * 菜单权限对象 sys_menu
 * 
 * @author 尹国春
 * @date 2022-07-25
 */
@ApiModel("菜单权限对象")
@TableName("sys_menu")
public class SysMenu implements Serializable
{
    private static final long serialVersionUID = 1L;

    /**  */
    @ApiModelProperty(value = "主键ID")
    @TableId(value = "menu_id",type = IdType.ASSIGN_ID)
    private String menuId;

    /** 菜单名称 */
    @Excel(name = "菜单名称")
    @ApiModelProperty(value = "菜单名称")
    @TableField("menu_name")
    private String menuName;

    /** 父菜单ID */
    @Excel(name = "父菜单ID")
    @ApiModelProperty(value = "父菜单ID")
    @TableField("parent_id")
    private String parentId;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    @ApiModelProperty(value = "显示顺序")
    @TableField("order_num")
    private Long orderNum;

    /** 路由地址 */
    @Excel(name = "路由地址")
    @ApiModelProperty(value = "路由地址")
    @TableField("path")
    private String path;

    /** 组件路径 */
    @Excel(name = "组件路径")
    @ApiModelProperty(value = "组件路径")
    @TableField("component")
    private String component;

    /** 路由参数 */
    @Excel(name = "路由参数")
    @ApiModelProperty(value = "路由参数")
    @TableField("params")
    private String params;

    /** 是否为外链（0是 1否） */
    @Excel(name = "是否为外链")
    @ApiModelProperty(value = "是否为外链（0是 1否）")
    @TableField("is_frame")
    private String isFrame;

    /** 是否缓存（0缓存 1不缓存） */
    @Excel(name = "是否缓存")
    @ApiModelProperty(value = "是否缓存（0缓存 1不缓存）")
    @TableField("is_cache")
    private String isCache;

    /** 菜单类型（M目录 C菜单 F按钮） */
    @ApiModelProperty(value = "菜单类型（M目录 C菜单 F按钮）")
    @TableField("menu_type")
    private String menuType;

    /** 菜单状态（0显示 1隐藏） */
    @Excel(name = "菜单状态")
    @ApiModelProperty(value = "菜单状态（0显示 1隐藏）")
    @TableField("visible")
    private String visible;

    /** 菜单状态（0正常 1停用） */
    @ApiModelProperty(value = "菜单状态（0正常 1停用）")
    @TableField("status")
    private String status;

    /** 权限标识 */
    @Excel(name = "权限标识")
    @ApiModelProperty(value = "权限标识")
    @TableField("perms")
    private String perms;

    /** 菜单图标 */
    @Excel(name = "菜单图标")
    @ApiModelProperty(value = "菜单图标")
    @TableField("icon")
    private String icon;

    /** 更新者 */
    @ApiModelProperty(hidden = true)
    @TableField("update_by")
    @UpdateUser
    private String updateBy;

    /** 更新时间 */
    @ApiModelProperty(hidden = true)
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @UpdateTime
    private Date updateTime;

    public SysMenu setMenuId(String menuId)
    {
        this.menuId = menuId;
        return this;
    }

    public String getMenuId()
    {
        return menuId;
    }
    public SysMenu setMenuName(String menuName)
    {
        this.menuName = menuName;
        return this;
    }

    public String getMenuName()
    {
        return menuName;
    }
    public SysMenu setParentId(String parentId)
    {
        this.parentId = parentId;
        return this;
    }

    public String getParentId()
    {
        return parentId;
    }
    public SysMenu setOrderNum(Long orderNum)
    {
        this.orderNum = orderNum;
        return this;
    }

    public Long getOrderNum()
    {
        return orderNum;
    }
    public SysMenu setPath(String path)
    {
        this.path = path;
        return this;
    }

    public String getPath()
    {
        return path;
    }
    public SysMenu setComponent(String component)
    {
        this.component = component;
        return this;
    }

    public String getComponent()
    {
        return component;
    }
    public SysMenu setParams(String params)
    {
        this.params = params;
        return this;
    }

    public String getParams()
    {
        return params;
    }
    public SysMenu setIsFrame(String isFrame)
    {
        this.isFrame = isFrame;
        return this;
    }

    public String getIsFrame()
    {
        return isFrame;
    }
    public SysMenu setIsCache(String isCache)
    {
        this.isCache = isCache;
        return this;
    }

    public String getIsCache()
    {
        return isCache;
    }
    public SysMenu setMenuType(String menuType)
    {
        this.menuType = menuType;
        return this;
    }

    public String getMenuType()
    {
        return menuType;
    }
    public SysMenu setVisible(String visible)
    {
        this.visible = visible;
        return this;
    }

    public String getVisible()
    {
        return visible;
    }
    public SysMenu setStatus(String status)
    {
        this.status = status;
        return this;
    }

    public String getStatus()
    {
        return status;
    }
    public SysMenu setPerms(String perms)
    {
        this.perms = perms;
        return this;
    }

    public String getPerms()
    {
        return perms;
    }
    public SysMenu setIcon(String icon)
    {
        this.icon = icon;
        return this;
    }

    public String getIcon()
    {
        return icon;
    }
    public SysMenu setUpdateBy(String updateBy)
    {
        this.updateBy = updateBy;
        return this;
    }

    public String getUpdateBy()
    {
        return updateBy;
    }
    public SysMenu setUpdateTime(Date updateTime)
    {
        this.updateTime = updateTime;
        return this;
    }

    public Date getUpdateTime()
    {
        return updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.SHORT_PREFIX_STYLE)
            .append("menuId", getMenuId())
            .append("menuName", getMenuName())
            .append("parentId", getParentId())
            .append("orderNum", getOrderNum())
            .append("path", getPath())
            .append("component", getComponent())
            .append("params", getParams())
            .append("isFrame", getIsFrame())
            .append("isCache", getIsCache())
            .append("menuType", getMenuType())
            .append("visible", getVisible())
            .append("status", getStatus())
            .append("perms", getPerms())
            .append("icon", getIcon())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
